package c.j.a.c.k;

import android.app.Activity;
import android.content.Context;
import android.os.Build.VERSION;
import c.j.a.a.a.a.i;
import c.j.a.c.h.a;

/* compiled from: DefaultPermissionChecker */
public class e implements c.j.a.a.a.a.e {
    public i a;

    public void a(Activity activity, String[] strArr, i iVar) {
        if (VERSION.SDK_INT >= 23) {
            this.a = iVar;
            activity.requestPermissions(strArr, 1);
            return;
        }
        ((a) iVar).a();
    }

    public boolean a(Context context, String str) {
        return context != null && b.i.c.a.a(context, str) == 0;
    }

    public void a(Activity activity, int i, String[] strArr, int[] iArr) {
        if (iArr.length > 0) {
            i iVar = this.a;
            if (iVar == null) {
                return;
            }
            if (iArr[0] == -1) {
                iVar.a(strArr[0]);
            } else if (iArr[0] == 0) {
                iVar.a();
            }
        }
    }
}
